package swingdemo;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class JFrameDemo extends JFrame implements ActionListener{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public JFrameDemo() {
		
		this.setSize(500,600);
		this.setTitle("自定义对话框");
		
		JButton but=new JButton("点击");
		but.addActionListener(this);
		add(but,BorderLayout.SOUTH);
		
		this.setVisible(true);
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
	}

	
	public static void main(String[] args) {
		new JFrameDemo();
	}


	@Override
	public void actionPerformed(ActionEvent e) {
		StandarDialog sd=new StandarDialog(this, "对话框", true);
		
	}
}
